Skip to content

Semantic RunInputs from a published description (Stage 1, PR 12) - #210

Merged
guijacquemet merged 2 commits into
mainfrom
claude/run-inputs-semantic
Nov 8, 2026
Merged

guijacquemet merged 2 commits into
mainfrom
claude/run-inputs-semantic

Conversation

@guijacquemet

Copy link
Copy Markdown
Contributor

Stacked on PR 209

This branch contains PR 11's two commits because it needs the manifest's experiment_description entry. Its base is PR 11's branch so the diff shows only PR 12; retarget to main once PR 11 merges. Related to issue 170; it does not close it.

What changed

Stage 1 design PR 12 (design section 3 "Semantic RunInputs"). For a run whose manifest has experiment_description:

  • Fov.repeat_group, condition_id, technical_repeat_id and channel_ids are added beside the unchanged key, which keeps the source folder labels (owner Q8). Folders that name no declared unit, or a unit whose channel count is not the image's, are a RunInputsError; nothing is guessed.
  • RunInputs.channel_index(fov, id) returns the C index; an absent channel is ChannelNotFoundError, never a default.
  • references() gives the condition reference graph by canonical ID; mask_semantics() and mask_check_status(mask_id, fov) give the masks' meaning and check status.
  • Only the published morphobricks.toml is read, and it must be the file whose SHA-256 the run recorded (also at RunInputs.open). A draft, a file not named morphobricks.toml, or a published file with an unconfirmed repeat is A_DRAFT_REFUSED (DraftRefusedError).
  • read_mask of a file the mask step has not checked is A_MASK_UNCHECKED (MaskUncheckedError).

A run without a description is unchanged: new Fov fields are None, description(), references() and mask_semantics() return None, read_mask is as before, and a description published after such a run is ignored.

To keep files under 600 lines, RunInputsError moved to run_inputs_error and LazyImage to run_inputs_image; both are still importable from run_inputs.

Conformance P14, P25 and the A_MASK_UNCHECKED part of P28: tests/test_spec_run_inputs_semantic.py (7 tests, added to the Spec gate), plus tests/test_run_inputs_semantic.py (11).

Regression tests

The new test files fail on the PR 11 code at collection (morphobricks_preprocessing.description_consume, run_inputs_error do not exist; Fov has no repeat_group), so they cannot pass without this change. P25 also checks that in v30 grouping by the source label would merge repeats Day1 and Day2.

Checks

python tools/check.py: ruff and code rules clean; 4188 passed, 4 skipped, 0 failed. The 4 skips are the same environmental ones as in PR 11 (case-sensitive file system x3, running as root x1). The v0.4.0 parity suite is part of this run and passed.

Not done

  • image_type and channel_availability() of the design sketch are not added (not in the requested scope).

Generated by Claude Code

Fov gains repeat_group, condition_id, technical_repeat_id and channel_ids beside the unchanged
key; RunInputs gains channel_index, references, mask_semantics and mask_check_status. Only the
published morphobricks.toml is read and it must be the file the run recorded: a draft or an
unconfirmed file is A_DRAFT_REFUSED, and reading a mask file the mask step has not checked is
A_MASK_UNCHECKED. A run without a description is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Scma6W3LC11s3qjXHZuGDm
@guijacquemet
guijacquemet changed the base branch from claude/run-description to main November 8, 2026 00:02
An error occurred while trying to automatically change base from claude/run-description to main November 8, 2026 00:02
@guijacquemet
guijacquemet merged commit 900ba44 into main Nov 8, 2026
7 checks passed
@guijacquemet
guijacquemet deleted the claude/run-inputs-semantic branch November 8, 2026 00:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants